package com.ruoyi.common.core.validator;



import com.ruoyi.common.core.annotation.NullList;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class NullNotBlankValidator implements ConstraintValidator<NullList,Object> {

    @Override
    public boolean isValid(Object value, ConstraintValidatorContext context) {
        if (value instanceof String){
            return !"".equals(value);
        }

        return true;
    }
}
